﻿// <copyright file="DebugData.cs" company="TenneySoftware">
// Copyright (c) 2009 All Right Reserved
// </copyright>
// <author>Robert Tenney</author>
// <email>rob10e@yahoo.com</email>
// <date>April 2009</date>
// <summary>The debug data holds the data that are dynamic and needed by the debug console for messages to display on screen.</summary>

// License:

// Product: RPGRoguelikeEngine .Net
// Author: Robert N. Tenney
// Copyright: April 2009

// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation version 2
// of the License.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

// This license covers all source code, binaries, and other materials related to this project
// unless specifically stated otherwise.

using System;
using TenneySoftware.Engine;

namespace TenneySoftware.Engine.Debug {
    /// <summary>
    /// The DebugData class extends the DebugBuffer class for displaying dynamic messages
    /// to the debug console.
    /// </summary>
    public class DebugData : DebugBuffer {
        /// <summary>
        /// Object that is reporting.
        /// </summary>
        private object dynamicMessage;
        
        /// <summary>
        /// Ending of the message.
        /// </summary>
        private string messageSuffix;

        /// <summary>
        /// Initializes a new instance of the DebugData class.
        /// </summary>
        /// <param name="identifier">Unique identifier.</param>
        /// <param name="message">Message to display.</param>
        /// <param name="dynamicMessage">The dynamic portion of the message.</param>
        /// <param name="messageSuffix">The closing of the message.</param>
        /// <param name="priority">Priority to set the message.</param>
        /// <param name="position">Position within the list.</param>
        public DebugData(string identifier, string message, object dynamicMessage, string messageSuffix, int priority, Position position) :
        base(identifier, message, priority, position) {
            this.dynamicMessage = dynamicMessage;
            this.messageSuffix = messageSuffix;
        }

        /// <summary>
        /// Gets or sets the closing of the message.
        /// </summary>
        /// <value>
        /// The closing of the message.
        /// </value>
        public string MessageSuffix {
            get {
                return this.messageSuffix;
            }
            
            set {
                this.messageSuffix = value;
            }
        }

        /// <summary>
        /// Gets or sets the dynamic portion object.
        /// </summary>
        /// <value>
        /// The dynamic portion object.
        /// </value>
        public object DynamicMessage {
            get {
                return this.dynamicMessage;
            }
            
            set {
                this.dynamicMessage = value;
            }
        }
    }
}
